package com.kepus.common.viewobject.common;

/**
 * 通用返回给前端的对象
 */
public class VOCommon {
    //操作状态
    private boolean isSuccess = false;
    //附加信息
    private String msg;
    //结果对象
    private Object result;

    public VOCommon() {
    }

    public VOCommon(boolean isSuccess, String msg) {
        this.isSuccess = isSuccess;
        this.msg = msg;
    }

    public static VOCommon instance(boolean isSuccess, String msg)
    {
        return new VOCommon(isSuccess, msg);
    }
    public VOCommon(boolean isSuccess, String msg, Object result) {
        this.isSuccess = isSuccess;
        this.msg = msg;
        this.result = result;
    }

    public boolean isSuccess() {
        return isSuccess;
    }

    public void setSuccess(boolean success) {
        isSuccess = success;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }
}
